package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.aop.AutoFill;
import com.zzyl.dto.NursingPlanPageQueryDto;
import com.zzyl.entity.NursingPlan;
import com.zzyl.entity.NursingProjectPlan;
import com.zzyl.vo.NursingPlanVo;
import com.zzyl.vo.NursingProjectVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface NursingPlanMapper {

    Page<NursingPlanVo> pageQuery(NursingPlanPageQueryDto dto);

    void insert(NursingPlan nursingPlan);

    @Select("select * from nursing_plan where id = #{id}")
    NursingPlan getById(Long id);

    void updateById(NursingPlan nursingPlan);

    @Delete("delete from nursing_plan where id = #{id}")
    void deleteById(Long id);

    @Select("select * from nursing_plan where status = 1 order by sort_no")
    List<NursingPlanVo> findAll();
}
